package com.woniuxy.servcie.impl;

import com.woniuxy.dao.RbacPermDao;
import com.woniuxy.entity.RbacPerm;
import com.woniuxy.servcie.RbacPermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 佘赛飞
 * @create 2021-11-26 12:29 上午
 */
@Service
public class RbacPermServiceImpl implements RbacPermService {
    @Autowired
    RbacPermDao rbacPermDao;

    @Override
    public RbacPerm findOneRbacPerm(int id) {
        return rbacPermDao.findOneRbacPerm(id);
    }

    @Override
    public List <RbacPerm> findAllRbacPerms(int[] roles) {
        return rbacPermDao.findAllRbacPerms(roles);
    }

    @Override
    public void addRbacPerm(RbacPerm rbacPerm) {
      rbacPermDao.addRbacPerm(rbacPerm);
    }

    @Override
    public Integer UpdateRbacPerm(RbacPerm rbacPerm) {
        return rbacPermDao.UpdateRbacPerm(rbacPerm);
    }

    @Override
    public void deleteRbacPerm(RbacPerm rbacPerm) {
       rbacPermDao.deleteRbacPerm(rbacPerm);
    }

    @Override
    public List <RbacPerm> FindAllAndPaginationRbacPerm() {
        return rbacPermDao.FindAllAndPaginationRbacPerm();
    }
}
